package net.xinshi.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.JsonNode;

import java.io.Serializable;

/**
 * @author <a href="mailto:liukuo@xinshi.net">liukuo</a>
 * @version 1.0
 * @description
 * @since 2017/6/27.
 */
public class ApiRequest implements Serializable {
    private static final long serialVersionUID = -819353265700958171L;

    private String requestData;

    // API编码
    String apiId;

    //token
    String appToken;

    // 时间戳，格式为yyyy-mm-ddHH:mm:ss，时区为GMT+8
    String timestamp;

    // 生成服务请求签名字符串所使用的算法类型，目前仅支持MD5
    String signMethod;

    // 服务请求的签名字符串
    String sign;

    //请求唯一标识,由最原始请求方产生:如UUID请去除"-"
    private String transactionUuid;

    @JsonIgnore
    private JsonNode originRequest;

    public String getApiId() {
        return apiId;
    }

    public void setApiId(String apiId) {
        this.apiId = apiId;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public String getSignMethod() {
        return signMethod;
    }

    public void setSignMethod(String signMethod) {
        this.signMethod = signMethod;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getRequestData() {
        return requestData;
    }

    public void setRequestData(String requestData) {
        this.requestData = requestData;
    }

    public String getTransactionUuid() {
        return transactionUuid;
    }

    public void setTransactionUuid(String transactionUuid) {
        this.transactionUuid = transactionUuid;
    }

    public JsonNode getOriginRequest() {
        return originRequest;
    }

    public void setOriginRequest(JsonNode originRequest) {
        this.originRequest = originRequest;
    }

    public String getAppToken() {
        return appToken;
    }

    public void setAppToken(String appToken) {
        this.appToken = appToken;
    }
}
